wm title . "T2I $VERSION"
wm geometry . 700x550

ttk::frame .toolbar

# Images used
set IMAGES(connect) [image create photo .img_connect \
	-file [file join $starkit::topdir img connect_no.gif]]
set IMAGES(add) [image create photo .img_add \
	-file [file join $starkit::topdir img add.gif]]
set IMAGES(list) [image create photo .img_list \
	-file [file join $starkit::topdir img player_playlist.gif]]
set IMAGES(locale) [image create photo .img_locale \
	-file [file join $starkit::topdir img locale.gif]]

# Menus
menu .mb -type menubar

menu .mb_t2i -type normal
.mb_t2i add command -label [tr "Connect"] -command connect
.mb_t2i add separator
.mb_t2i add command -label [tr "Channel list"] -command sendlist
.mb_t2i add separator
.mb_t2i add command -label [tr "About"] -command about

menu .mb_config -type normal
.mb_config add command -label [tr "Change style"] -command chstyle
.mb_config add command -label [tr "Change font"] -command chfont
.mb_config add command -label [tr "Change language"] -command chlang

.mb add cascade -menu .mb_t2i -label "T2I"
.mb add cascade -menu .mb_config -label [tr "Settings"]
. configure -menu .mb

ttk::frame .mainframe
set n_conns [ttk::notebook .mainframe.notebook_conns]

ttk::frame .inputfr
ttk::entry .inputfr.input
ttk::button .inputfr.send -text [tr "Send"] -command sendmsg

set statusbar [ttk::label .statusbar -text "" -width 80]

grid \
	[ttk::button .toolbar.connect -compound top -style Toolbutton \
		-text [tr "Connect"] -command connect \
		-image $IMAGES(connect)] -row 0 -column 0

grid \
	[ttk::button .toolbar.chanlist -compound top -style Toolbutton \
		-text [tr "Channel list"] -command sendlist \
		-image $IMAGES(list)] -row 0 -column 1
 
grid .inputfr.input -sticky ew -row 1
grid .inputfr.send  -column 1 -row 1
grid columnconfigure .inputfr 0 -weight 1 
grid columnconfigure .mainframe 0 -weight 1 
grid rowconfigure .mainframe 0 -weight 1 
grid .toolbar   -sticky w
grid .mainframe -sticky nsew
grid .inputfr   -sticky ew
grid .statusbar -sticky ew

grid $n_conns -sticky nsew

grid rowconfigure . 1 -weight 1
grid columnconfigure . 0 -weight 1
